<template>
  <div class="softArticlePromotion">
    <commonBanner
      bgUrl="https://oss-imag.aiseoword.com/aiseo-image/img-tab05-bannerIMG.webp"
      :listArr="['资源整合', '持续保障', '实时监测']"
      chatInfo="您好, 我想了解更多关于网站优化的内容"
      buttonText="网站咨询"
      backgroundPosition="center"
    >
      <img
        class="softArticlePromotion-img"
        src="@/assets/image/mobile/websiteOptimization/title.png"
        alt="网站优化"
      />
    </commonBanner>
    <!-- 内容撰写难题 -->
    <div class="content-write-dificult">
      <img
        class="title-image"
        src="@/assets/image/mobile/websiteOptimization/dificult-title.png"
      />
      <div class="title-contente">
        在进行网站优化时，企业常常面临诸多挑战和难点。这些难点不仅涉及技术层面的复杂性，还包括了用户行为分析、搜索引擎算法变化、多渠道整合等多方面的问题。
      </div>
      <div class="dificult-list-outer scrollbar-class">
        <div class="dificult-list">
          <div class="dificult-item">
            <img
              class="dificult-image"
              src="@/assets/image/mobile/websiteOptimization/dificult-title1.png"
            />
            <div class="dificult-title">提高效率</div>
            <div class="dificult-content">
              网站内数据量大且复杂，有效收集、整理和分析这些数据需要耗费大量时间和资源。搜索引擎算法的不断变化要求优化策略必须灵活调整，以适应新的排名规则，这无疑增加了优化工作的复杂性和不确定性。
            </div>
          </div>
          <div class="dificult-item">
            <img
              class="dificult-image"
              src="@/assets/image/mobile/websiteOptimization/dificult-title2.png"
            />
            <div class="dificult-title">资源整合</div>
            <div class="dificult-content">
              网站优化涉及的内容广泛，需要整合的资源种类繁多，包括但不限于搜索引擎优化(SEO)策略、优质外链资源、内容营销资源、社交媒体推广渠道等。有效收集和筛选这些资源需要专业的知识和丰富的经验。
            </div>
          </div>
          <div class="dificult-item">
            <img
              class="dificult-image"
              src="@/assets/image/mobile/websiteOptimization/dificult-title3.png"
            />
            <div class="dificult-title">持续保障</div>
            <div class="dificult-content">
              网站优化的难点还在于如何确保优化效果的持久性和稳定性,包括不断更新搜索引擎算法和及时调整优化策略以应对变化；同时，保持对网站内容、结构、用户体验等方面的持续优化，确保网站在持续竞争中保持领先地位。
            </div>
          </div>
          <div class="dificult-item">
            <img
              class="dificult-image"
              src="@/assets/image/mobile/websiteOptimization/dificult-title4.png"
            />
            <div class="dificult-title">实时监测</div>
            <div class="dificult-content">
              实时监测需要系统能够快速响应并处理大量数据，任何延迟都可能导致优化策略的不及时或失误。在高并发或复杂场景下，确保监测系统的稳定性和准确性是一个技术难题。
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- 更简单 -->
    <div class="more-simple" v-if="currentpage > pageShowNode.simple">
      <img
        class="title-image"
        src="@/assets/image/mobile/websiteOptimization/simple-title.png"
      />
      <div class="title-contente">
        面对网站优化难题，我们提供一站式解决方案！从网站结构优化、内容质量提升，到关键词策略制定和用户体验优化，我们拥有专业的团队和丰富的经验，帮助您的网站在搜索引擎中脱颖而出，提升排名和流量。选择我们，让网站优化不再成为难题，助您实现网络营销目标。
      </div>
    </div>
    <!-- pc轮播对应 -->
    <swipperlist
      :carouselList="carouselList"
      v-if="currentpage > pageShowNode.simple"
    ></swipperlist>
    <endButton v-if="currentpage > pageShowNode.simple"></endButton>
    <div class="loading-box" v-show="loadingPage">...加载中</div>
  </div>
</template>

<script setup>
import commonBanner from "@/components/mobileComponent/commonBanner.vue";
import { ref, reactive, onMounted, onUnmounted, onBeforeUnmount } from "vue";
import EventBus from "@/utils/eventBus.js";
import titleImg1 from "@/assets/image/mobile/websiteOptimization/banner-title1.png";
import titleImg2 from "@/assets/image/mobile/websiteOptimization/banner-title2.png";
import titleImg3 from "@/assets/image/mobile/websiteOptimization/banner-title3.png";
import titleImg4 from "@/assets/image/mobile/websiteOptimization/banner-title4.png";
import titleImg5 from "@/assets/image/mobile/websiteOptimization/banner-title5.png";

import img1 from "@/assets/image/mobile/websiteOptimization/banner1.png";
import img2 from "@/assets/image/mobile/websiteOptimization/banner2.png";
import img3 from "@/assets/image/mobile/websiteOptimization/banner3.png";
import img4 from "@/assets/image/mobile/websiteOptimization/banner4.png";
import img5 from "@/assets/image/mobile/websiteOptimization/banner5.png";
import swipperlist from "./swipperlist.vue";
import endButton from "./endButton.vue";

// 分段加载页面
const currentpage = ref(1);
const loadingPage = ref(false);
const pageShowNode = reactive({
  simple: 1,
});
const handleScrollToBottom = () => {
  if (currentpage.value < 2) {
    loadingPage.value = true;
    setTimeout(() => {
      currentpage.value++;
      loadingPage.value = false;
    }, 1000);
  }
};
// 判断是否存在滚动条，
const initScroll = () => {
  const appDiv = document.getElementById("app");
  if (appDiv.scrollHeight > appDiv.clientHeight) {
    return;
  } else {
    currentpage.value++;
    nextTick(() => {
      initScroll();
    });
  }
};
const carouselList = ref([
  {
    img: img1,
    titleImg: titleImg1,
    title: "关键词优化服务",
    disc: "同等成本,让您的关键词排名靠前;同样市场,锁定目标客户快速吸引询盘;帮你获得更快、更准、更多的目标流量.",
  },
  {
    img: img2,
    titleImg: titleImg2,
    title: "整站优化服务",
    disc: "整站优化不以单个关键词排名为标准,而是以进入搜索引擎首页或前三名的关键词数量和整体目标搜索量为依据. 根据约定的关键词数量或网站权重进行考核.",
  },
  {
    img: img3,
    titleImg: titleImg3,
    title: "外链优化",
    disc: "建立好的外链关系与链接;对外部资源的引用... 可对网站的SEO价值创造巨大提升.",
  },
  {
    img: img4,
    titleImg: titleImg4,
    title: "网站结构优化",
    disc: "优化网站结构使其有良好的导航用途. 包括在网站不同页面之间、不同层级之间的链接.",
  },
  {
    img: img5,
    titleImg: titleImg5,
    title: "专业高效服务",
    disc: "根据不同需求提供具有针对性的方案和服务. 例如根据产品特性、目标客户搜索习惯等量身定制方案.",
  },
]);
onMounted(() => {
  initScroll();
  EventBus.on("scrollToBottom", handleScrollToBottom);
});
onBeforeUnmount(() => {
  EventBus.off("scrollToBottom");
});
</script>

<style lang="scss" scoped>
.softArticlePromotion {
  width: 100%;
  background: #f5f5f5;
  .loading-box {
    text-align: center;
    font-family: Microsoft YaHei, Microsoft YaHei;
    font-weight: bold;
    font-size: 10px;
    color: #808080;
    line-height: 24px;
    letter-spacing: 1px;
  }
  .title-contente {
    margin-top: 16px;
    font-family: Microsoft YaHei UI, Microsoft YaHei UI;
    font-weight: 400;
    font-size: 14px;
    color: #808080;
    line-height: 20px;
    padding: 0 40px;
    box-sizing: border-box;
    text-align: center;
  }
  .softArticlePromotion-img {
    height: 88px;
  }
  .content-write-dificult {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 80px;
    .title-image {
      width: 148px;
      height: 50px;
      margin: 0 auto;
    }
    .dificult-list-outer {
      width: 100%;
      margin-top: 32px;
      padding: 16px;
      box-sizing: border-box;
      overflow: overlay;
      .dificult-list {
        display: grid;
        grid-template-rows: repeat(1, 240px);
        grid-template-columns: repeat(6, 307px);
        .dificult-item {
          background: #ffffff;
          border-radius: 12px;
          padding: 32px 12px 0 12px;
          box-sizing: border-box;
          & + .dificult-item {
            margin-left: 12px;
          }
          .dificult-image {
            height: 18px;
          }
          .dificult-title {
            font-family: Microsoft YaHei UI, Microsoft YaHei UI;
            font-weight: bold;
            font-size: 16px;
            color: #1a1a1a;
            line-height: 16px;
            margin-top: 8px;
          }
          .dificult-content {
            font-family: Microsoft YaHei UI, Microsoft YaHei UI;
            font-weight: 400;
            font-size: 14px;
            color: #808080;
            line-height: 20px;
            margin-top: 16px;
          }
        }
      }
    }
  }
  .more-simple {
    margin: 30px 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    .title-image {
      width: 268px;
    }
  }
}
</style>
